import request from '@/utils/request'

// 查询会议主题列表
export function listTheme(query) {
  return request({
    url: '/vote/theme/list',
    method: 'get',
    params: query
  })
}

// 查询会议主题列表
export function listNoPageTheme(query) {
  return request({
    url: '/vote/theme/allList',
    method: 'get',
    params: query
  })
}

// 查询会议主题详细
export function getTheme(id) {
  return request({
    url: '/vote/theme/' + id,
    method: 'get'
  })
}

// 新增会议主题
export function addTheme(data) {
  return request({
    url: '/vote/theme',
    method: 'post',
    data: data
  })
}

// 修改会议主题
export function updateTheme(data) {
  return request({
    url: '/vote/theme',
    method: 'put',
    data: data
  })
}

// 删除会议主题
export function delTheme(id) {
  return request({
    url: '/vote/theme/' + id,
    method: 'delete'
  })
}

// 导出会议主题
export function exportTheme(query) {
  return request({
    url: '/vote/theme/export',
    method: 'get',
    params: query
  })
}
